/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.5s ease;
}

body.clear-sky {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
}

body.few-clouds {
    background: linear-gradient(135deg, #636e72, #b2bec3);
}

body.clouds, body.mist, body.haze {
    background: linear-gradient(135deg, #636e72, #b2bec3);
}

body.rain, body.drizzle {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

body.thunderstorm {
    background: linear-gradient(135deg, #2d3436, #636e72);
}

body.snow {
    background: linear-gradient(135deg, #dfe6e9, #b2bec3);
}

.container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

h1 {
    color: #2d3436;
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.search-container {
    display: flex;
    margin-bottom: 20px;
}

#city-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 25px 0 0 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#city-input:focus {
    border-color: #74b9ff;
}

#search-btn {
    padding: 12px 20px;
    background: #74b9ff;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

#search-btn:hover {
    background: #0984e3;
}

.location-btn-container {
    margin-bottom: 30px;
}

#location-btn {
    padding: 12px 25px;
    background: #00b894;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

#location-btn:hover {
    background: #00a085;
}

.weather-info {
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
}

#city-name {
    font-size: 1.8rem;
    color: #2d3436;
    margin-bottom: 10px;
}

.temperature-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
}

#temperature {
    font-size: 4rem;
    font-weight: bold;
    color: #2d3436;
}

.temp-unit {
    font-size: 2rem;
    color: #636e72;
    margin-top: -10px;
}

.weather-description {
    font-size: 1.3rem;
    color: #636e72;
    margin-bottom: 20px;
}

.weather-details {
    text-align: left;
    max-width: 300px;
    margin: 0 auto 20px;
    padding: 15px;
    background: rgba(116, 185, 255, 0.1);
    border-radius: 10px;
}

.weather-details p {
    margin: 8px 0;
    font-size: 1.1rem;
    color: #2d3436;
}

.update-time {
    font-size: 0.9rem;
    color: #636e72;
}

.error-message {
    color: #d63031;
    font-size: 1.1rem;
    padding: 15px;
    background: rgba(214, 48, 49, 0.1);
    border-radius: 10px;
}

.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    #city-input {
        border-radius: 25px;
        margin-bottom: 10px;
    }
    
    #search-btn {
        border-radius: 25px;
        padding: 12px;
    }
    
    #temperature {
        font-size: 3rem;
    }
    
    .temp-unit {
        font-size: 1.5rem;
    }
    
    #city-name {
        font-size: 1.5rem;
    }
    
    .weather-description {
        font-size: 1.1rem;
    }
    
    .weather-details p {
        font-size: 1rem;
    }
}